package com.ctshk.rpc.train.enums;

import com.ctshk.common.enums.AirTouristType;

/**
 * <p>
 *
 * </p>
 *
 * @author 李新科
 * @date 2021/5/14 19:48
 */
public enum SeatAliApiEnum {

    /**
     * 座位等级
     */
    ED("ed", "二等座"),
    YD("yd", "一等座"),
    SW("sw", "商务座"),
    TD("td", "特等座"),
    rz("rz", "软座"),
    yz("yz", "硬座"),
    gr1("gr1", "高级软卧上"),
    gr2("gr2", "高级软卧下"),
    rw1("rw1", "软卧上"),
    rw2("rw2", "软卧下"),
    yw1("yw1", "硬卧上"),
    yw2("yw2", "硬卧中"),
    yw3("yw3", "硬卧下"),
    wz("wz", "无座"),
    qt("qt", "其他"),
    dw("dw", "动卧"),
    dw1("dw1", "高级软卧")
    ;

    private String code;
    private String name;

    SeatAliApiEnum( String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }

    public static String getName(String code){
        for (SeatAliApiEnum value : SeatAliApiEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getName();
            }
        }
        return  null;
    }
}
